package blatt6;

public class Job implements Comparable<Job>{
	private int duration, deadline;
	
	public Job(int duration, int deadline){
		this.duration = duration;
		this.deadline = deadline;
	}
	public int getDuration(){
		return duration;
	}
	public int getDeadline(){
		return deadline;
	}
	public String toString(){
		return "["+ duration +","+ deadline +"]";
	}
	
	public int compareTo(Job item) {
        if(deadline < item.getDeadline())
            return -1;
        if(deadline > item.getDeadline())
            return 1;
        return 0;
    }
}
